# -*- coding: utf-8 -*-
__author__ = 'yanshi'

database = {
    'host': 'localhost',
    'user': 'root',
    'passwd': '',
    'db': 'stage',
    'charset': 'utf8',
    'port': 3306
}

default_test_site ={
    'site':'http://www.baidu.com'
}

template = {

    'youdaili_temp': {
        'template': '<a href="(?P<url>http:.*?)".*?(?:color=red>|articlelist_time">)(?P<time>.*?)<'
    },
    '56ads_temp': {
        'template': 'b><a href="(?P<url>.*?)" class="title">.*?(?P<time>\d{4}(?:\.\d{1,2}){2})</a>'
    },
    'dlipw_temp': {
        'template': 'date"><span>(?P<time>\d{4})<.*?"f">(\d{2}/\d{2})<.*? href="(?P<url>.*?)" title=.*?</a>'
    },

    'goodips_temp': {
        'template': 'li><a href="(?P<url>.*?)".*?(?P<time>\d{4}).*?</a>',
        'pagenum': 'title=".*?" href=".*?">(\d+?)</'
    },
    'ip_temp': '(?P<ip>(?:(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d?\d))(?::| *|.*?)(?P<port>\d{1,5})'
}

page_url_temp = {
    'goodips_temp': '&pageid=%s'
}